<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.lp.cfg.ProConfig"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html>
<html>
<head>
	<title><%=ProConfig.PROJECT_NAME %></title>
	<%@ include file="/WEB-INF/wechat/iot/common/resource_lib.jsp"%>
	<style type="text/css">
		body, html {
		    height: 100%;
		    -webkit-tap-highlight-color: transparent;
		}
		p.weui-tabbar__label{
			color:#999 !important ;
		}
		.weui-tabbar__icon {
		    width: 24px;
		    height: 24px;
		}
		.weui-tabbar__icon.active img.active{
			display: block;
		}
		.weui-tabbar__icon.active img{
			display: none;
		}
		.weui-tabbar__icon img{
			display: block;
		}
		.weui-tabbar__icon img.active{
			display: none;
		}
		.weui-cells{
			color: #333;
		}
		.weui-cells label{
			font-size: 15px;
		}
		.weui-cells span{
			font-size: 14px;
		}
	</style>
</head>
<body>
	<div class="weui-tab">
		<div class="body-container" style="height: 100%;overflow: auto;">
			<input type="hidden" class="alarm_id" >
			<div class="weui-cells weui-cells_form jui-detail_get" config-option=" url:'/alarm.json?id=$.alarm_id$',success:'successBack' "  >
				<div class="weui-cell">
					<div class="weui-cell__hd">
						<label for="" class="weui-label">报警名称</label>
					</div>
					<div class="weui-cell__bd">
						<span type-name="name" type-value="h"></span>
					</div>
				</div>
				<div class="weui-cell">
					<div class="weui-cell__hd">
						<label for="" class="weui-label">异常数值</label>
					</div>
					<div class="weui-cell__bd">
						<span type-name="sdata" type-value="h"></span>
					</div>
				</div>
				<div class="weui-cell">
					<div class="weui-cell__hd">
						<label for="" class="weui-label">异常描述</label>
					</div>
					<div class="weui-cell__bd">
						<span style="color:red;opacity: 0.7;" type-name="description" type-value="h"></span>
					</div>
				</div>
				<div class="weui-cell">
					<div class="weui-cell__hd">
						<label for="" class="weui-label">报警联系人</label>
					</div>
					<div class="weui-cell__bd">
						<span style="opacity: 0.7;" type-name="contact_names" type-value="h"></span>
					</div>
				</div>
				<div class="weui-cell">
					<div class="weui-cell__hd">
						<label for="" class="weui-label">紧急级别</label>
					</div>
					<div class="weui-cell__bd">
						<span style="color:darkolivegreen;" type-name="iot_trigger_alarm_level" type-value="ch"></span>
					</div>
				</div>
				<div class="weui-cell">
					<div class="weui-cell__hd">
						<label for="" class="weui-label">处理标志</label>
					</div>
					<div class="weui-cell__bd">
						<span style="color: cornflowerblue;" type-name="iot_alarm_process_status" type-value="ch"></span>
					</div>
				</div>
				<div class="weui-cell">
					<div class="weui-cell__hd">
						<label for="" class="weui-label">异常时间</label>
					</div>
					<div class="weui-cell__bd">
						<span id="happentime"></span>
					</div>
				</div>
				<div class="weui-cell">
					<div class="weui-cell__hd">
						<label for="" class="weui-label">处理时间</label>
					</div>
					<div class="weui-cell__bd">
						<span id="sloveTime">~~</span>
					</div>
				</div>
			</div>
			
			

			<div style="height: 50px;width: 100%;"></div>
		</div>
		<%@ include file="/WEB-INF/wechat/iot/moudle/operate.jsp"%>
	</div>
	
	</div>

</body>
<script type="text/javascript">
	$(".weui-tabbar .weui-tabbar__icon").eq(1).addClass("active");
	$(".alarm_id").val( GetQueryString("id") );
	function successBack(data){
		if(isOK(data)){
			$("#happentime").html(time2Str(data.data.atime));
			if(data.data.iot_alarm_process_status != 46){
				$("#sloveTime").html(time2Str(data.data.mtime));			
			}
		}
	}
	$(function(){
	})
</script>
</html>